package com.isoft.airportsystem.service.impl;


import com.isoft.airportsystem.entity.META;
import com.isoft.airportsystem.entity.STLS.DFLT_STLS;
import com.isoft.airportsystem.mapper.MetaMapper;
import com.isoft.airportsystem.mapper.STLSMapper;
import com.isoft.airportsystem.service.STLSService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.UUID;

@Service
public class STLSServiceImpl implements STLSService {
    @Resource
    private STLSMapper stlsMapper;

    @Resource
    private MetaMapper metaMapper;
    @Override
    public Integer add(DFLT_STLS stls, META meta) {
        String metaid = UUID.randomUUID().toString().replace("-", "").toLowerCase();
        if(!stls.getStnd().isEmpty()){
            stlsMapper.add(stls, metaid);
        }else{
            stlsMapper.addEmy(stls, metaid);
        }
        metaMapper.add(meta,metaid);
        return null;
    }
}
